package com.objecteffects.ilmp.service;

import com.google.inject.Inject;
import com.google.inject.persist.Transactional;

import com.objecteffects.ilmp.model.TumblrBlogEntity;
import com.objecteffects.ilmp.persist.api.ITumblrBlogEntityDao;
import com.objecteffects.ilmp.util.logger.InjectLogger;

import org.slf4j.Logger;

/**
 * @author Rusty Wright
 */
public class TumblrBlogEntityService {
    @InjectLogger
    private Logger log;

    private final ITumblrBlogEntityDao dao;

    /** */
    @Inject
    TumblrBlogEntityService(final ITumblrBlogEntityDao _dao) {
        this.dao = _dao;
    }

    @Transactional
    public void save(final TumblrBlogEntity input) {
        this.dao.save(input);
    }

    @Transactional
    public TumblrBlogEntity update(final TumblrBlogEntity entity) {
        return this.dao.update(entity);
    }

    @Transactional
    public void deleteById(final Long id) {
        this.dao.deleteById(id);
    }
}
